﻿<Window x:Class="XamlLocalizer.Preview"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Xaml Localizer Addin - Preview" Height="551" Width="580" 
    xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit" ShowInTaskbar="False" MinWidth="580" MinHeight="250" WindowStartupLocation="CenterOwner">
    <Grid>  
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="35"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Margin="5">
            <TextBlock Text="Resource File: " Margin="2"/>
            <ComboBox ItemsSource="{Binding ResourceFilesList}" SelectedItem="{Binding SelectedResourceFile}" VerticalAlignment="Top" HorizontalAlignment="Left"/>
        </StackPanel>
        <Button Content="Find..." HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,15,0" Padding="5,0"
                Command="{Binding FindCommand}"/>
        <toolkit:DataGrid Grid.Row="1" ItemsSource="{Binding Items}" Name="dataGrid"
                          AutoGenerateColumns="False" ColumnHeaderHeight="30">
            <toolkit:DataGrid.Columns>
                <toolkit:DataGridCheckBoxColumn Binding="{Binding IsChecked}" Header="Sel"/>
                <toolkit:DataGridTextColumn Binding="{Binding Key}" Width="100" Header="Key"/>
                <toolkit:DataGridTextColumn Binding="{Binding Text}" Width="100" Header="Text"/>
                <toolkit:DataGridTextColumn Binding="{Binding Comment}" Width="200" Header="Comment"/>
            </toolkit:DataGrid.Columns>
        </toolkit:DataGrid>
        <Label Grid.Row="2" Margin="5,5,5,5" Content="Mode" HorizontalAlignment="Left"/>
        <ComboBox Grid.Row="2" HorizontalAlignment="Left" Margin="45,8,5,5" Width="200" SelectedItem="{Binding ReplaceMode}"
                  ItemsSource="{Binding ReplaceModeList}" VerticalAlignment="Top"/>
        <CheckBox Grid.Row="2" HorizontalAlignment="Left" Margin="265,10,5,5" IsChecked="{Binding ReformatXaml}" Content="_Reformat Xaml"/>
        <Button Grid.Row="2" HorizontalAlignment="Right" Margin="5,5,105,5" Command="{Binding RunExtraction}">_Extract Resources</Button>
        <Button Grid.Row="2" HorizontalAlignment="Right" Margin="5" Command="{Binding PrettyFormat}">_Pretty Format</Button>
    </Grid>
</Window>
